<?php declare(strict_types=1);


namespace App\Model\Entity;

use Swoft\Db\Annotation\Mapping\Column;
use Swoft\Db\Annotation\Mapping\Entity;
use Swoft\Db\Annotation\Mapping\Id;
use Swoft\Db\Eloquent\Model;


/**
 * 用户的google fcm token
 * Class GoogleFcm
 *
 * @since 2.0
 *
 * @Entity(table="google_fcm")
 */
class GoogleFcm extends Model
{
    /**
     * 用户ID
     * @Id(incrementing=false)
     * @Column(name="member_id", prop="memberId")
     *
     * @var int
     */
    private $memberId;

    /**
     * google fcm验证令牌
     *
     * @Column(name="fcm_token", prop="fcmToken")
     *
     * @var string
     */
    private $fcmToken;

    /**
     * 时间
     *
     * @Column(name="created_at", prop="createdAt")
     *
     * @var int
     */
    private $createdAt;

    /**
     * 1:android 2:ios 3:web
     *
     * @Column()
     *
     * @var int
     */
    private $device;

    /**
     * 设备号
     *
     * @Column(name="device_number", prop="deviceNumber")
     *
     * @var string|null
     */
    private $deviceNumber;

    /**
     * aws snss终端节点
     *
     * @Column(name="end_point_arn", prop="endPointArn")
     *
     * @var string
     */
    private $endPointArn;

    /**
     * 订阅arn
     *
     * @Column(name="subscribe_arn", prop="subscribeArn")
     *
     * @var string
     */
    private $subscribeArn;


    /**
     * @param int $memberId
     *
     * @return void
     */
    public function setMemberId(int $memberId): void
    {
        $this->memberId = $memberId;
    }

    /**
     * @param string $fcmToken
     *
     * @return void
     */
    public function setFcmToken(string $fcmToken): void
    {
        $this->fcmToken = $fcmToken;
    }

    /**
     * @param int $createdAt
     *
     * @return void
     */
    public function setCreatedAt(int $createdAt): void
    {
        $this->createdAt = $createdAt;
    }

    /**
     * @param int $device
     *
     * @return void
     */
    public function setDevice(int $device): void
    {
        $this->device = $device;
    }

    /**
     * @param string|null $deviceNumber
     *
     * @return void
     */
    public function setDeviceNumber(?string $deviceNumber): void
    {
        $this->deviceNumber = $deviceNumber;
    }

    /**
     * @param string $endPointArn
     *
     * @return void
     */
    public function setEndPointArn(string $endPointArn): void
    {
        $this->endPointArn = $endPointArn;
    }

    /**
     * @param string $subscribeArn
     *
     * @return void
     */
    public function setSubscribeArn(string $subscribeArn): void
    {
        $this->subscribeArn = $subscribeArn;
    }

    /**
     * @return int
     */
    public function getMemberId(): ?int
    {
        return $this->memberId;
    }

    /**
     * @return string
     */
    public function getFcmToken(): ?string
    {
        return $this->fcmToken;
    }

    /**
     * @return int
     */
    public function getCreatedAt(): ?int
    {
        return $this->createdAt;
    }

    /**
     * @return int
     */
    public function getDevice(): ?int
    {
        return $this->device;
    }

    /**
     * @return string|null
     */
    public function getDeviceNumber(): ?string
    {
        return $this->deviceNumber;
    }

    /**
     * @return string
     */
    public function getEndPointArn(): ?string
    {
        return $this->endPointArn;
    }

    /**
     * @return string
     */
    public function getSubscribeArn(): ?string
    {
        return $this->subscribeArn;
    }

}
